package Hot100.Easy.LC338;

public class LC338 {
    public static void main(String[] args) {

    }
    public int[] countBits(int n){
        int[] res = new int[n + 1];
        res[0] = 0;
        for(int i = 1; i <= n; i++){
            if(i % 2 == 1){
                res[i] = res[i - 1] + 1;
            } else{
                res[i] = res[i / 2];
            }
        }
        return res;
    }
}
